meson.build: Fix Visual Studio builds
authorChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 Mar 2020 04:00:26 +0000 (12:00 +0800)
committerChun-wei Fan <fanchunwei@src.gnome.org>
Tue, 31 Mar 2020 04:00:26 +0000 (12:00 +0800)
We need to make the C++ language available before we can access the C++
compiler object...

meson.build

index 44274a442c26e125926a2757fe5de15154195a0f..25db8e5145e1f0637427076a0dd8dc4b562862d4 100644 (file)
@@ -230,6 +230,7 @@ if cc.get_id() == 'msvc'
   ]
   add_project_arguments(cc.get_supported_arguments(test_cflags), language: 'c')
 
+  add_languages('cpp')
   cxx = meson.get_compiler('cpp')
   if cxx.get_id() == 'msvc'
     add_project_arguments(cxx.get_supported_arguments(test_cflags), language: 'cpp')